package net.pimpas.web.jsf.managedbean.visitor;

import java.util.ArrayList;
import java.util.List;

import net.pimpas.core.visitor.BaseClassVisitor;
import net.pimpas.util.reflection.ReflectionUtil;
import net.pimpas.web.jsf.managedbean.ManagedBeanAnnotation;

public class ManagedBeanVisitor extends BaseClassVisitor {

	private static final List<Class> managedBeanClasses = new ArrayList<Class>();

	@Override
	public void visitClass(Class clazz) {
		if(ReflectionUtil.checkAnnotationInClass(ManagedBeanAnnotation.class, clazz))
			managedBeanClasses.add(clazz);
	}
	
	public static List<Class> getManagedBeanClasses( ) {
		return managedBeanClasses; 
	}
}